-
-
Notifications
You must be signed in to change notification settings - Fork 48
feat: tgpu.fn(callback) for providing slots and accessors #2029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
pkg.pr.new packages benchmark commit |
📊 Bundle Size Comparison
👀 Notable resultsStatic test results:No major changes. Dynamic test results:No major changes. 📋 All resultsClick to reveal the results table (323 entries).
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu. |
…k' into feat/tgpufn-callback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add more tests to see if the .with API works on these generic functions?
A new overload for
tgpu.fnthat accepts a shell-less callback and returns a callable that has a.with()method. This allows shell-less functions to also be provided with slot and accessor overrides.Example
Requirements
foois used in code, andtgpu.fn(foo)is also used in code, it should only generate one definition.